package com.zzy.database.service.Impl;

import com.zzy.database.mapper.BranchMapper;
import com.zzy.database.pojo.Branch;
import com.zzy.database.service.BranchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BranchServiceImpl implements BranchService {

    @Autowired
    private BranchMapper branchMapper;

    @Override
    public void addBranch(Branch branch) {
        branchMapper.addBranch(branch);
    }

    @Override
    public void deleteBranchById(String branchId) {
        branchMapper.deleteBranchById(branchId);
    }

    @Override
    public void updateBranch(Branch branch) {
        branchMapper.updateBranch(branch);
    }

    @Override
    public Branch getBranchById(String branchId) {
        return branchMapper.getBranchById(branchId);
    }

    @Override
    public List<Branch> getAllBranches() {
        return branchMapper.getAllBranches();
    }
}
